package org.bopis.action;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;

/**
 * Action encargada de realizar el logout del usuario
 * 
 * @author i-fernandezmolina
 * 
 */
public class LogoutAction extends CustomBaseAction {

	public ActionForward execute(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response)
			throws Exception {
		// eliminamos los datos del usuario de la sesion
		removeObjectFromSession(request, "userContainer");

		// devolvemos el mappinf
		return mapping.findForward("Success");
	}

}
